<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>注册</title>
    <link href="../../assets/css/relys/login.css" rel="stylesheet">
</head>
<body>
<div class="container" id="app">
    <div class="loginBox">
        <h3>注册</h3>
        <form id="loginForm">
            <div class="input-wrapper">
                <label>账号:</label>
                <input name="" placeholder="请输入账号" type="text" v-model="username">
            </div>
            <div class="input-wrapper">
                <label>密码:</label>
                <input name="" placeholder="密码" type="password" v-model="mima">
            </div>
            <div class="input-wrapper">
                <label>企业编号:</label>
                <input name="" placeholder="请输入企业编号" type="text" v-model="qiyebianhao">
            </div>
            <div class="input-wrapper">
                <label>企业名称:</label>
                <input name="" placeholder="请输入企业名称" type="text" v-model="qiyemingcheng">
            </div>
            <div class="input-wrapper">
                <label>负责人:</label>
                <input name="" placeholder="请输入负责人" type="text" v-model="fuzeren">
            </div>
            <div class="input-wrapper">
                <label>联系电话:</label>
                <input name="" placeholder="请输入联系电话" type="text" v-model="lianxidianhua">
            </div>
            <div class="input-wrapper">
                <label>招聘岗位:</label>
                <input name="" placeholder="请输入招聘岗位" type="text" v-model="zhaopingangwei">
            </div>
            <div class="input-wrapper">
                <label>招聘人数:</label>
                <input name="" placeholder="请输入招聘人数" type="text" v-model="zhaopinrenshu">
            </div>
            <div class="input-wrapper">
                <label>赞:</label>
                <input name="" placeholder="请输入赞" type="text" v-model="thumbsupnum">
            </div>
            <div class="input-wrapper">
                <label>踩:</label>
                <input name="" placeholder="请输入踩" type="text" v-model="crazilynum">
            </div>
        </form>
        <a href="../login/login.html">已有账号？去登录</a>
        <button @click="userRegister" type="button">注册</button>
    </div>
</div>
<script src="../../assets/js/relys/jquery.js"></script>
<script src="../../assets/js/relys/vue.js"></script>
<script src="../../assets/js/api/api.js"></script>
<script src="../../assets/js/api/defaultuser.js"></script>
<script type="text/javascript">
    var app = new Vue({
        el: "#app",
        data: {
            username: '',
            mima: '',
            "qiyebianhao": "",
            "qiyemingcheng": "",
            "fuzeren": "",
            "lianxidianhua": "",
            "zhaopingangwei": "",
            "zhaopinrenshu": "",
            "thumbsupnum": "",
            "crazilynum": "",
        },
        methods: {
            userRegister() {
                var data = {
                    "": this.username,
                    "mima": this.mima,
                    "qiyebianhao": this.qiyebianhao,
                    "qiyemingcheng": this.qiyemingcheng,
                    "fuzeren": this.fuzeren,
                    "lianxidianhua": this.lianxidianhua,
                    "zhaopingangwei": this.zhaopingangwei,
                    "zhaopinrenshu": this.zhaopinrenshu,
                    "thumbsupnum": this.thumbsupnum,
                    "crazilynum": this.crazilynum,
                }
                register('zhaopinxinxi', data, function (res) {
                    if (res.code == 0) {
                        alert('注册成功')
                        window.parent.location.href = '../login/login.html'
                    }
                })
            }
        }
    })
</script>
</body>
</html>
